import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Index from '@/components/index'
import MapContainer from '@/components/MapContainer'
import modelMap from '@/components/modelMap'
import Data from '@/components/dataShow'
import Regist from '@/components/regist'
import Captcha from '@/components/captcha'
import Layout from '@/components/page/Layout'
import User from '@/components/page/user'
import Addr from '@/components/page/addr'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/hello',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path:'/map',
      name:"MapContainer",
      component: MapContainer
    },
    {
      path: '/newMap',
      name: 'modelMap',
      component: modelMap
    },
    {
      path:'/data',
      name:'Data',
      component:Data
    },
    {
      path:'/regist',
      name:'Regist',
      component:Regist
    },
    {
      path:'/captcha',
      name:'Captcha',
      component:Captcha
    },
    {
      path :'/main',
      name :'Layout',
      component :Layout,
      children:[{
          path: '/main',
          name: 'User',
          component: User
        }, 
        {
          path: '/addr',
          name: 'Addr',
          component: Addr
      }]
    }
  ]
})
